package com.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import living.com.domain.User;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * 
 * </p>
 *
 * @author 大忽悠
 * @since 2022年02月08日
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("issue_comment_response")
public class IssueCommentResponse implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父评论id
     */
    private Integer fatherCommentId;

    /**
     * 当前子评论所属用户id---当前子评论所属的用户是匿名用户时,该值为0---版主才可以匿名
     */
    private Integer fromUserId;

    /**
     * 父评论所属用户id---当前子评论所属的用户是匿名用户时,该值为0--版主才可以匿名
     */
    private Integer toUserId;

    /**
     * 子评论内容
     */
    @Length(min = 1,max = 1000,message = "评论字数在1个字到1000个字之间")
    private String content;

    /**
     * 评论类型
     */
    private Integer type;

    /**
     * 逻辑删除
     */
    private Integer isDeleted;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    private Integer likeSum;

    private Integer responseSum;

    /**
     * 当前用户是否给当前儿子点赞了
     */
    @TableField(exist = false)
    private Integer isLike;

    @TableField(exist = false)
    private User publisher;
}
